package examples;

import java.util.List;

import com.echonest.api.v4.Artist;
import com.echonest.api.v4.ArtistParams;
import com.echonest.api.v4.EchoNestAPI;
import com.echonest.api.v4.EchoNestException;

public class SimilarArtist {

        public static String API_KEY = "QTJ926WQJ92B089WB";
        public static void main(String[] args) throws EchoNestException {
                EchoNestAPI echoNest = new EchoNestAPI(API_KEY);
                List<Artist> artists = echoNest.searchArtists("Jens Zimmermann");


                if (artists.size() > 0) {
                        Artist queryArtist = artists.get(0);
                        System.out.println("Similar artists for " + queryArtist.getName());
                        for (Artist simArtist : queryArtist.getSimilar(10)) {
                                System.out.println("   " + simArtist.getName());
                        }
                }
        }
}